package com.bmic.cotacoes;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class Frequencia extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.configura);
		final EditText frequencia = (EditText) findViewById(R.id.update_rate_entry);
		frequencia.setText("30");
		Button saveButton = (Button) findViewById(R.id.save_button);

		saveButton.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				int segundos = Integer
						.parseInt(frequencia.getText().toString());
				Configuracao.atualizaAlarme(segundos);
				finish();
			}
		});
	}
}
